package com.mfp.java.testYou.ui.tags;

import com.mfp.java.testYou.core.AppContext;
import javax.servlet.jsp.tagext.BodyTagSupport;

/**
 * Created by IntelliJ IDEA.
 * User: Cristina
 * Date: 11/12/11
 * Time: 5:40 PM
 * To change this template use File | Settings | File Templates.
 */
public class StudentOnlyTag extends BodyTagSupport {
    //TODO
    private static final long serialVersionUID = 3530409656181484021L;
    @Override
	public int doStartTag() {
		if (AppContext.getUserSession(this.pageContext.getRequest()).isStudent()) {
			return EVAL_BODY_INCLUDE;
		} else {
			return SKIP_BODY;
		}
	}
}
